package zhhaojie;

import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;

public class FileCopy {
	public static void main(String[] args) throws IOException {
		FileInputStream fis =  new FileInputStream("d:/test/a.txt");
		FileOutputStream fos = new FileOutputStream("d:/test/b.txt");

		byte[] buff = new byte[256];
		int len = buff.length;
		
		while((len=fis.read(buff))>0){
			fos.write(buff,0,len);
		}
		fis.close();
		fos.close();
		
	}

}
